/*
 * @描述: 卡信息 service层
 * @Author: /zlh
 * @Date: 2021-04-17 09:26:22
 * @Last Modified by: zlh
 * @Last Modified time: 2021-06-17 11:55:58
 */

import request from '@/utils/request';
import { secMap } from '@/configs/api.map';

const { api_getSecurityCardList, api_getFundCardList, api_getCityPaymentList, api_getCityMaintenaceTip,
  api_getBindFailList, api_getTieCardFailLog, api_decryptCard, api_getSecurityCardDetail, api_getFundCardDetail,
  api_getFundCardPayMentList, api_getSecurityCardPayMentList } = secMap;
/**
 * @description 获取社保卡信息列表
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} channel
 * @returns
 */
export async function getSecurityCardList(channel) {
  return request(api_getSecurityCardList, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 获取社保卡信息详情
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} data
 * @returns
 */
export async function getSecurityCardDetail(data) {
  return request(api_getSecurityCardDetail, {
    method: 'POST',
    data
  });
}
/**
 * @description 获取公积金列表
 * @author zlh
 * @date 2021-04-29
 * @export
 * @param {object} channel
 * @returns
 */
export async function getFundCardList(channel) {
  return request(api_getFundCardList, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 获取公积金绑卡详情
 * @author zlh
 * @date 2021-04-29
 * @export
 * @param {object} channel
 * @returns
 */
export async function getFundCardDetail(channel) {
  return request(api_getFundCardDetail, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 下拉城市选项列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} channel
 * @returns
 */
export async function getAllCity(channel) {
  return request(api_getAllCity, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 获取城市维护信息列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} channel
 * @returns
 */
export async function getCityMaintenaceTip(channel) {
  return request(api_getCityMaintenaceTip, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 绑卡失败查询列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} channel
 * @returns
 */
export async function getBindFailList(channel) {
  return request(api_getBindFailList, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 卡操作日志查询列表
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} channel
 * @returns
 */
export async function getTieCardFailLog(channel) {
  return request(api_getTieCardFailLog, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 解密社保、公积金卡
 * @author zlh
 * @date 2021-04-28
 * @export
 * @param {object} channel
 * @returns
 */
export async function decryptCard(channel) {
  return request(api_decryptCard, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 社保缴费详情查询
 * @author zlh
 * @date 2021-09-06
 * @export
 * @param {object} channel
 * @returns
 */
export async function getSecurityCardPayMentList(channel) {
  return request(api_getSecurityCardPayMentList, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
/**
 * @description 公积金缴费详情查询
 * @author zlh
 * @date 2021-09-06
 * @export
 * @param {object} channel
 * @returns
 */
export async function getFundCardPayMentList(channel) {
  return request(api_getFundCardPayMentList, {
    method: 'POST',
    data: {
      ...channel,
    },
  });
}
